<?php

namespace Application\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

use Zend\Authentication\AuthenticationService;

class IndexController extends AbstractActionController
{
    public function indexAction()
    {
        return new ViewModel();
    }
    
    public function loginAction(){
		$auth = new AuthenticationService();

        if ($auth->hasIdentity()) {
            $identity = $auth->getIdentity();
        }
		
        $auth->clearIdentity();
		
		$sessionManager = new \Zend\Session\SessionManager();
        $sessionManager->forgetMe();
		
		
        $view = new ViewModel();
        $view->setTerminal(true);
        return $view;
    }
}
